# coding: utf-8
from common.models.user import User
from application import db


class ParterDetail(db.Model):
    __tablename__ = 'parter_detail'

    id = db.Column(db.Integer, primary_key=True)
    classone = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    classtwo = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    type = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    size = db.Column(db.Float)
    mark = db.Column(db.Integer)
    updated_time = db.Column(db.DateTime)
    created_time = db.Column(db.DateTime)
    uid = db.Column(db.Integer,db.ForeignKey('user.id'))
    pid = db.Column(db.Integer)
    url = db.Column(db.TEXT)

    creater = db.relationship('User', foreign_keys=uid)
